-
Notifications
You must be signed in to change notification settings - Fork 14
feat(utils): add NodeJS profiler #1219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add explanation that sink determines output format (DevTools TraceEvent, OpenTelemetry, etc.) - Improve documentation clarity for flexible serialization capabilities - Fix duplicate imports in profiler unit test
- Replace method implementations with vi.fn() spy functions - Add vi import from vitest - Enables better testing with call tracking and assertions
|
View your CI Pipeline Execution ↗ for commit ac4a1fc
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/js-packages-plugin
@code-pushup/eslint-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 25388bf with previous commit ea27cdc. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 2 groups improved, 👎 1 group regressed, 👍 11 audits improved, 👎 2 audits regressed, 13 audits changed without impacting score🗃️ Groups
31 other groups are unchanged. 🛡️ Audits
653 other audits are unchanged. |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 25388bf with previous commit ea27cdc. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 46 | 🟡 57 | |
| Code coverage | 🟢 95 | 🟢 95 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 7 audits improved, 👎 2 audits regressed
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 46 | 🟡 57 | |
| Code coverage | Code coverage metrics | 🟢 95 | 🟢 95 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Properties coverage | 🟥 27 undocumented properties | 🟥 24 undocumented properties | |
| JSDocs coverage | Classes coverage | 🟨 3 undocumented classes | 🟨 2 undocumented classes | |
| JSDocs coverage | Methods coverage | 🟨 13 undocumented methods | 🟨 9 undocumented methods | |
| JSDocs coverage | Variables coverage | 🟥 49 undocumented variables | 🟥 49 undocumented variables | |
| JSDocs coverage | Types coverage | 🟥 66 undocumented types | 🟥 65 undocumented types | |
| JSDocs coverage | Functions coverage | 🟥 241 undocumented functions | 🟥 241 undocumented functions | |
| Code coverage | Branch coverage | 🟩 91.7 % | 🟩 91.6 % | |
| Code coverage | Function coverage | 🟩 95.7 % | 🟩 95.6 % | |
| Code coverage | Line coverage | 🟩 97.7 % | 🟩 97.8 % |
435 other audits are unchanged.
13 other projects are unchanged.
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
# Conflicts: # packages/utils/src/lib/profiler/profiler.int.test.ts # packages/utils/src/lib/profiler/profiler.unit.test.ts
Related: #1197
This PR includes:
NodeJSProfilerclassNodeJSProfilerPerformanceObserverSink- add getStatus for better testing, more robust and memory friendly buffer logicNote
Introduces a Node.js profiling runtime with buffered performance entry handling and richer diagnostics.
NodejsProfilerthat wrapsProfilerwith aPerformanceObserverSink, manages WAL/sink lifecycle, runtime enable/disable, state transitions,flush(), andstatsexposure (with optional debug transition markers viaCP_PROFILER_DEBUG)PerformanceObserverSinkwith safe bounded queue (maxQueueSize), proactive flushing (flushThreshold), buffered capture, encode error handling (optional debug marks),getStats(), andvalidateFlushThresholdMockSink/MockTraceEventFileSink(Recoverable), new PerformanceObserver test utils, comprehensive unit/integration tests for sink and profilersWritten by Cursor Bugbot for commit ac4a1fc. This will update automatically on new commits. Configure here.